﻿<Application xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
             x:Class="MoneyBook.App"
             xmlns:appsvc="clr-namespace:System.ServiceModel.DomainServices.Client.ApplicationServices;assembly=System.ServiceModel.DomainServices.Client.Web"
             xmlns:local="clr-namespace:MoneyBook"
             xmlns:localNav="clr-namespace:MoneyBook.Navigation"
             xmlns:resourceStrings="clr-namespace:MoneyBook.Assets.Resources"
             xmlns:localData="clr-namespace:MoneyBook.Windows.Data"
             >
    <Application.ApplicationLifetimeObjects>
        <local:WebContext>
            <local:WebContext.Authentication>
                <appsvc:FormsAuthentication DomainContextType="MoneyBook.Web.Services.MoneyBookAuthenticationContext"/>
            </local:WebContext.Authentication>
        </local:WebContext>
        <localNav:NavigationMessageService />
    </Application.ApplicationLifetimeObjects>

    <Application.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/MoneyBook;component/Assets/Styles.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
        
        <local:PagesWrapper x:Key="PagesWrapper" />
        <local:DialogsWrapper x:Key="DialogWrapper" />
        <resourceStrings:StringsWrapper x:Key="Strings" />
        <resourceStrings:ExceptionMessagesWrapper x:Key="ExceptionMessages" />
        
        <localData:BooleanInverter x:Key="BooleanInverter" />
        <localData:NullToBooleanConverter x:Key="NullToBooleanConverter" />
        <localData:NullableConverter x:Key="NullableConverter" />
        <localData:CutoffTimeConverter x:Key="CutoffTimeConverter" />
        <localData:StringToXmlLanguageConverter x:Key="StringToXmlLanguageConverter" />
    </Application.Resources>
</Application>
